package com.woniuxy.third.service.impl;

import com.woniuxy.third.entity.*;
import com.woniuxy.third.mapper.StudentMapper;
import com.woniuxy.third.service.StudentService;
import com.woniuxy.third.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {

    @Resource
    private StudentMapper studentMapper;

    @Override
    public Student findStudentById(int id) {
        return studentMapper.findStudentById(id);
    }

    @Override
    @Transactional
    public boolean addStudent(Student student) {
        return studentMapper.addStudent(student);
    }

    @Override
    @Transactional
    public boolean updateStudent(Student student) {
        return studentMapper.updateStudent(student);
    }

    @Override
    @Transactional
    public void imageUpload(String image, int id) {
        studentMapper.imageUpload(image,id);
    }


}
